/*
============================================================================
 Name        : BlockLogin.h
 Author      : \x{738b}\x{658c}
 Version     :
 Copyright   : \x{76ca}\x{76df}\x{8f6f}\x{4ef6}
 Description : CBlockRegister declaration
============================================================================
*/

#ifndef BLOCKREGISTER_H
#define BLOCKREGISTER_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "Block.h"
// CLASS DECLARATION
class CSingleLineTextInput;
class CCheckBox;
class CControl;

//const TInt KMenuIdLogin = 0;
//const TInt KMenuIdGetPasswd = 1;

const TInt KMenuIdRegister = 0;
/**
*  CBlockRegister
* 
*/
class CBlockRegister : public CBlock
{
public:
	~CBlockRegister();

	static CBlockRegister* NewL(CBaseBlock* bsBack);

	static CBlockRegister* NewLC(CBaseBlock* bsBack);

	CBlockRegister(CBaseBlock* bsBack);

private:
	void ConstructL();

public:
	void OnDraw(CFbsBitGc& g) const;

	TBool OnMenuEvent(TInt menuId);

	void OnKeyEvent(const TInt& keyCode);
	//void OnKeyDown(TInt keyCode);
	
	void SizeChanged();

	void OnMouseUp(const TPoint& aPt);

	void DrawTitle(CFbsBitGc& g, TRect aRect, TInt aBaseLine) const;

	void OnInput(const TDesC8& strInput);
	
	void ChangeFocus(TBool aFocus, const TInt& keyCode);

	TInt GetDataLength();
	TInt16 GetDataType();
	TInt GetIOType();
	
	void WriteData(TDes8& aBuf);
	TBool ReadData(const TDesC8& aData);
	
private:
	//TInt m_nType; // 1:register
	TInt m_nCurrent;
	CSingleLineTextInput* m_inputphone;
	CControl* m_Ctrls[1];
	CDesCArray* m_strArray;
	CDesCArray* m_strArray2;
};

#endif // BlockLogin_H
